package org.mihalovic.PES.Core.Graph;



/**
 * Generic exception for any higher-level error related to graph processing
 */
class GraphException extends Exception{
    private Edge edge;
    private /*int*/String nodeID;


    GraphException(String message, Edge edge, /*int*/String nodeID) {
        this(message, edge, nodeID, null);
    }

    GraphException(String message, Edge edge, /*int*/String nodeID, Throwable cause) {
        super(message, cause);
        this.edge = edge;
        this.nodeID = nodeID;
    }

    GraphException(String message, Edge edge) {
        this(message, edge, (Throwable)null);
    }

    GraphException(String message, Edge edge, Throwable cause) {
        super(message, cause);
        this.edge = edge;
    }


    Edge getedge(){ return this.edge; }
    /*int*/String getVertexName() { return this.nodeID; }
}
